<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the image properties</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagick.getimageprofiles.html">Imagick::getImageProfiles</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagick.getimageproperty.html">Imagick::getImageProperty</a></div>
 <div class="up"><a href="class.imagick.html">Imagick</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="imagick.getimageproperties" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::getImageProperties</h1>
  <p class="verinfo">(PECL imagick 2.0.0)</p><p class="refpurpose"><span class="refname">Imagick::getImageProperties</span> &mdash; <span class="dc-title">Returns the image properties</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.getimageproperties-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>Imagick::getImageProperties</strong></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$pattern</code><span class="initializer"> = &quot;*&quot;</span></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$only_names</code><span class="initializer"> = true</span></span>
  ]] )</div>


  <p class="para rdfs-comment">
   Returns all associated properties that match the pattern. If <strong><code>TRUE</code></strong> is passed as second parameter
   only the property names are returned. 此方法在Imagick基于ImageMagick 6.3.6以上版本编译时可用。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.getimageproperties-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">pattern</code></em></dt>

     <dd>

      <p class="para">
      The pattern for property names.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">only_names</code></em></dt>

     <dd>

      <p class="para">
      Whether to return only property names. If <strong><code>FALSE</code></strong> then also the values are returned
      </p>
     </dd>

    
   </dl>

  </p>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-imagick.getimageproperties-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
  Returns an array containing the image properties or property names.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-imagick.getimageproperties-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3232">
    <p><strong>Example #1 Using <span class="function"><strong>Imagick::getImageProperties()</strong></span>:</strong></p>
    <div class="example-contents"><p>
     An example of extracting EXIF information.
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">/*&nbsp;Create&nbsp;the&nbsp;object&nbsp;*/<br /></span><span style="color: #0000BB">$im&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">imagick</span><span style="color: #007700">(</span><span style="color: #DD0000">"/path/to/example.jpg"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*&nbsp;Get&nbsp;the&nbsp;EXIF&nbsp;information&nbsp;*/<br /></span><span style="color: #0000BB">$exifArray&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$im</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getImageProperties</span><span style="color: #007700">(</span><span style="color: #DD0000">"exif:*"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*&nbsp;Loop&nbsp;trough&nbsp;the&nbsp;EXIF&nbsp;properties&nbsp;*/<br /></span><span style="color: #007700">foreach&nbsp;(</span><span style="color: #0000BB">$exifArray&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$name&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">$property</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #007700">{</span><span style="color: #0000BB">$name</span><span style="color: #007700">}</span><span style="color: #DD0000">&nbsp;=&gt;&nbsp;</span><span style="color: #007700">{</span><span style="color: #0000BB">$property</span><span style="color: #007700">}</span><span style="color: #DD0000">&lt;br&nbsp;/&gt;\n"</span><span style="color: #007700">;&nbsp;<br />}<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagick.getimageprofiles.html">Imagick::getImageProfiles</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagick.getimageproperty.html">Imagick::getImageProperty</a></div>
 <div class="up"><a href="class.imagick.html">Imagick</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
